package Test;

import java.util.Scanner;

public class TTT4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int size = Integer.parseInt(sc.nextLine());
        int res = 0;
        for (int i = 0; i < size; i++) {
            String line = sc.nextLine();
            if (valid(line)){
                res++;
            }
        }
        System.out.println(res);
    }
    public static boolean valid(String input){
        if (input.length() > 10) return false;
        for (int i = 0; i < input.length(); i++) {
            char cur = input.charAt(i);
            if ((97 <= cur && 122 >= cur) || (65 <= cur && 90 >= cur)){
            }
            else return false;
        }
        return true;
    }
}
